import { createApp } from 'vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
// 路由
import router from './router'
import '@/permission'
// svg
import 'virtual:svg-icons-register'
// 全局样式
import '@/styles/index.scss'
// 全局组件
import gloablComponent from './components/index';
// pinia
import { createPinia } from 'pinia'
// 引入图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/theme-chalk/dark/css-vars.css'

// console.log(import.meta.env)
const app = createApp(App)
// 全局注册图标
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.use(createPinia())
app.use(gloablComponent)
app.use(router)
app.use(ElementPlus)
app.mount('#app')
